import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Input2 {
    public static void  main(String[] args){
        BufferedReader buf;
        String str;
        float num;
        buf=new BufferedReader(new InputStreamReader(System.in));
        System.out.println("请输入数字：");
        try {
            str = buf.readLine();
            System.out.println("你输入的字符串是：" + str);
            num=Float.parseFloat(str);
            System.out.println("经过转换后得到的数字是："+num);
        }
        catch (IOException e){
            e.printStackTrace();
        }
    }
}
